package com.pi.wms.repository;

import com.pi.framework.core.repository.IBaseRepository;
import com.pi.wms.entity.TwaDocSoHeader;
import com.pi.wms.entity.TwiDocMesKitDocline;
import com.pi.wms.entity.TwiInventoryXwmsDetails;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;


public interface MesKitDoclineRepository extends IBaseRepository<TwiDocMesKitDocline, Long>{

	@Query("from TwiDocMesKitDocline ")
	List<TwiDocMesKitDocline> findAll();

	@Query("from TwiDocMesKitDocline where documentNumber=:documentNumber ")
	List<TwiDocMesKitDocline> findByDocumentNumber(@Param("documentNumber") String documentNumber);

    @Modifying
    @Query("delete from TwiDocMesKitDocline where documentNumber=:documentNumber  ")
    int delete(@Param("documentNumber") String documentNumber);


}
